\begin{tikzpicture}

\definecolor{darkgray176}{RGB}{176,176,176}
\definecolor{green01270}{RGB}{0,127,0}

\begin{axis}[
tick align=outside,
tick pos=left,
x grid style={darkgray176},
xmin=-0.5125, xmax=2.5125,
xtick style={color=black},
y grid style={darkgray176},
ymin=0, ymax=5.355,
ytick style={color=black}
]
\draw[draw=none,fill=blue] (axis cs:-0.375,0) rectangle (axis cs:-0.125,1);
\draw[draw=none,fill=blue] (axis cs:0.625,0) rectangle (axis cs:0.875,2);
\draw[draw=none,fill=blue] (axis cs:1.625,0) rectangle (axis cs:1.875,3);
\draw[draw=none,fill=green01270] (axis cs:-0.125,0) rectangle (axis cs:0.125,3);
\draw[draw=none,fill=green01270] (axis cs:0.875,0) rectangle (axis cs:1.125,2);
\draw[draw=none,fill=green01270] (axis cs:1.875,0) rectangle (axis cs:2.125,4);
\draw[draw=none,fill=red] (axis cs:0.125,0) rectangle (axis cs:0.375,5);
\draw[draw=none,fill=red] (axis cs:1.125,0) rectangle (axis cs:1.375,3);
\draw[draw=none,fill=red] (axis cs:2.125,0) rectangle (axis cs:2.375,1);
\path [draw=black, line width=2pt]
(axis cs:-0.25,0.9)
--(axis cs:-0.25,1.1);

\path [draw=black, line width=2pt]
(axis cs:0.75,1.8)
--(axis cs:0.75,2.2);

\path [draw=black, line width=2pt]
(axis cs:1.75,2.5)
--(axis cs:1.75,3.5);

\addplot [line width=2pt, black, mark=-, mark size=8, mark options={solid}, only marks]
table {%
-0.25 0.9
0.75 1.8
1.75 2.5
};
\addplot [line width=2pt, black, mark=-, mark size=8, mark options={solid}, only marks]
table {%
-0.25 1.1
0.75 2.2
1.75 3.5
};
\path [draw=black, line width=2pt]
(axis cs:0,2.6)
--(axis cs:0,3.4);

\path [draw=black, line width=2pt]
(axis cs:1,1.8)
--(axis cs:1,2.2);

\path [draw=black, line width=2pt]
(axis cs:2,3.5)
--(axis cs:2,4.5);

\addplot [line width=2pt, black, mark=-, mark size=8, mark options={solid}, only marks]
table {%
0 2.6
1 1.8
2 3.5
};
\addplot [line width=2pt, black, mark=-, mark size=8, mark options={solid}, only marks]
table {%
0 3.4
1 2.2
2 4.5
};
\path [draw=black, line width=2pt]
(axis cs:0.25,4.9)
--(axis cs:0.25,5.1);

\path [draw=black, line width=2pt]
(axis cs:1.25,2.8)
--(axis cs:1.25,3.2);

\path [draw=black, line width=2pt]
(axis cs:2.25,0.9)
--(axis cs:2.25,1.1);

\addplot [line width=2pt, black, mark=-, mark size=8, mark options={solid}, only marks]
table {%
0.25 4.9
1.25 2.8
2.25 0.9
};
\addplot [line width=2pt, black, mark=-, mark size=8, mark options={solid}, only marks]
table {%
0.25 5.1
1.25 3.2
2.25 1.1
};
\end{axis}

\end{tikzpicture}
